﻿using MediatR;
using Sgr.Application.Commands;
using Sgr.Domain.Uow;
using Sgr.Indentity.Application.ViewModels;
using Sgr.Security.VerifyCode;

namespace Sgr.Indentity.Application.Commands
{
    public class VerifyCodeLoginCommand : IRequest<CommandResult<TokenViewModel>>, IRequireUnitOfWork
    {
        /// <summary>
        /// 验证码接收方式
        /// </summary>
        public ReceiverType ReceiverType { get; set; } = ReceiverType.Email;

        /// <summary>
        /// 用途
        /// </summary>
        public string Purpose { get; set; } = "";

        /// <summary>
        /// 接收地址（手机号/邮箱）
        /// </summary>
        public string Receiver { get; set; } = string.Empty;

        /// <summary>
        /// 验证码
        /// </summary>
        public string VerificationCode { get; set; } = string.Empty;

        /// <summary>
        /// 图像验证码
        /// </summary>
        public string ImageVerificationCode { get; set; } = string.Empty;

        /// <summary>
        /// 图像验证码Hash值
        /// </summary>
        public string ImageVerificationHash { get; set; } = string.Empty;

        /// <summary>
        /// 时间戳
        /// </summary>
        public string Timestamp { get; set; } = string.Empty;

        /// <summary>
        /// 随机数
        /// </summary>
        public string Nonce { get; set; } = string.Empty;

        /// <summary>
        /// 签名
        /// </summary>
        public string Signature { get; set; } = string.Empty;
    }
}